package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.convert.DataSizeUnit;
//有参构造


@TableName("user")
@Data
public class User {
    //    @TableId(type = IdType.AUTO)
    @TableId(type = IdType.ASSIGN_ID)
    private Integer id;
    private String username;
    private String password;
    private String nickName;
    private Integer age;
    private String sex;
    private String address;
    //    这个字段在数据库不存在，多出来需要加上注解
    @TableField(exist = false)
    private String token;
}
